﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel;

namespace BugzX.Models
{
    public class BugNewViewData
    {
        public string ErrorMessage { get; set; }

        public string Title { get; set; }
        [DisplayNameAttribute("Project Component")]
        public int ComponentId { get; set; }
        public BugType Type { get; set; }
        public int Priority { get; set; }

        public string ProjectName { get; set; }

        public string Description { get; set; }

        [DisplayNameAttribute("Parent To")]
        public string ParentTo { get; set; }
        [DisplayNameAttribute("Dependent On")]
        public string DependentOn { get; set; }

        public List<ProjectComponent> Components { get; set; }
        public List<BugType> Types
        {
            get
            {
                var values = Enum.GetValues(typeof(BugType)).Cast<BugType>();

                return (from v in values
                        select v).ToList();
            }
        }
    }
}